﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace PMS.Masters
{
    public partial class Basic : System.Web.UI.MasterPage
    {
        public string theme;
        public List<BD_btnPermission> btnPerm = null;
        protected void Page_Load(object sender, EventArgs e)
        {
            string url = Request.RawUrl.ToString();
            string shortUrl = url.Split('?')[0];
            BD_Permission perm = OperateContext.SessPermission.Where(p => p.LinkUrl == shortUrl).FirstOrDefault();
            if (perm != null)
            {
                btnPerm = OperateContext.SessbtnPermission.Where(b => b.perId == perm.Id).OrderBy(b => b.Order).ToList();

            }
            theme = Request[OperateContext.theme].ToString();

        }
    }
}